SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for la_album
-- ----------------------------
DROP TABLE IF EXISTS `la_album`;
CREATE TABLE `la_album`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `cid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类目ID',
  `aid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `uid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户ID',
  `type` tinyint(2) UNSIGNED NOT NULL DEFAULT 10 COMMENT '文件类型: [10=图片, 20=视频]',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '文件名称',
  `uri` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件路径',
  `ext` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '文件扩展',
  `size` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件大小',
  `is_delete` int(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_cid`(`cid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '相册管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_album_cate
-- ----------------------------
DROP TABLE IF EXISTS `la_album_cate`;
CREATE TABLE `la_album_cate`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级ID',
  `type` tinyint(2) UNSIGNED NOT NULL DEFAULT 10 COMMENT '类型: [10=图片, 20=视频]',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分类名称',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: [0=否, 1=是]',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '相册分类表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for la_dict_data
-- ----------------------------
DROP TABLE IF EXISTS `la_dict_data`;
CREATE TABLE `la_dict_data`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `type_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '键名',
  `value` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数值',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '备注',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) NOT NULL COMMENT '状态: 0=停用, 1=正常',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_dict_type
-- ----------------------------
DROP TABLE IF EXISTS `la_dict_type`;
CREATE TABLE `la_dict_type`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '字典名称',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '字典类型',
  `dict_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '字典备注',
  `dict_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '字典状态: 0=停用, 1=正常',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_gen_table
-- ----------------------------
DROP TABLE IF EXISTS `la_gen_table`;
CREATE TABLE `la_gen_table`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '表名称',
  `table_comment` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '表描述',
  `sub_table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联表名称',
  `sub_table_fk` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联表外键',
  `author_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '作者的名称',
  `entity_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '实体的名称',
  `module_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '生成模块名',
  `function_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '生成功能名',
  `tree_primary` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '树主键字段',
  `tree_parent` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '树父级字段',
  `tree_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '树显示字段',
  `gen_tpl` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'crud' COMMENT '生成模板方式: [crud=单表, tree=树表]',
  `gen_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '生成代码方式: [0=zip压缩包, 1=自定义路径]',
  `gen_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '/' COMMENT '生成代码路径: [不填默认项目路径]',
  `remarks` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成业务表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_gen_table_column
-- ----------------------------
DROP TABLE IF EXISTS `la_gen_table_column`;
CREATE TABLE `la_gen_table_column`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '列主键',
  `table_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '表外键',
  `column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '列名称',
  `column_comment` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '列描述',
  `column_length` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '列长度',
  `column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '列类型 ',
  `java_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'JAVA类型',
  `java_field` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'JAVA字段',
  `is_pk` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否主键: [1=是, 0=否]',
  `is_increment` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自增: [1=是, 0=否]',
  `is_required` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否必填: [1=是, 0=否]',
  `is_insert` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否插入字段: [1=是, 0=否]',
  `is_edit` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否编辑字段: [1=是, 0=否]',
  `is_list` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否列表字段: [1=是, 0=否]',
  `is_query` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否查询字段: [1=是, 0=否]',
  `query_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'EQ' COMMENT '查询方式: [等于、不等于、大于、小于、范围]',
  `html_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '显示类型: [文本框、文本域、下拉框、复选框、单选框、日期控件]',
  `dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '字典类型',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序编号',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成字段表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_hot_search
-- ----------------------------
DROP TABLE IF EXISTS `la_hot_search`;
CREATE TABLE `la_hot_search`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关键词',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序号',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '热门搜索配置表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_notice_setting
-- ----------------------------
DROP TABLE IF EXISTS `la_notice_setting`;
CREATE TABLE `la_notice_setting`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `scene` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '场景编号',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '场景名称',
  `remarks` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '场景描述',
  `recipient` tinyint(1) NOT NULL DEFAULT 1 COMMENT '接收人员: [1=用户, 2=平台]',
  `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '通知类型: [1=业务, 2=验证]',
  `system_notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '系统的通知设置',
  `sms_notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '短信的通知设置',
  `oa_notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '公众号通知设置',
  `mnp_notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '小程序通知设置',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '消息通知设置表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for la_system_auth_admin
-- ----------------------------
DROP TABLE IF EXISTS `la_system_auth_admin`;
CREATE TABLE `la_system_auth_admin`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dept_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '部门ID',
  `post_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '岗位ID',
  `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户账号',
  `nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
  `password` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
  `avatar` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像',
  `role` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '角色主键',
  `salt` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '加密盐巴',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序编号',
  `is_multipoint` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '多端登录: 0=否, 1=是',
  `is_disable` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否禁用: 0=否, 1=是',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: 0=否, 1=是',
  `last_login_ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最后登录IP',
  `last_login_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后登录',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统管理成员表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_auth_dept
-- ----------------------------
DROP TABLE IF EXISTS `la_system_auth_dept`;
CREATE TABLE `la_system_auth_dept`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上级主键',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '部门名称',
  `duty` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '负责人名',
  `mobile` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系电话',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序编号',
  `is_stop` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否禁用: 0=否, 1=是',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统部门管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_auth_menu
-- ----------------------------
DROP TABLE IF EXISTS `la_system_auth_menu`;
CREATE TABLE `la_system_auth_menu`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上级菜单',
  `menu_type` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '权限类型: M=目录，C=菜单，A=按钮',
  `menu_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '菜单名称',
  `menu_icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '菜单图标',
  `menu_sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '菜单排序',
  `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '权限标识',
  `paths` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '路由地址',
  `component` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '前端组件',
  `selected` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '选中路径',
  `params` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '路由参数',
  `is_cache` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否缓存: 0=否, 1=是',
  `is_show` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否显示: 0=否, 1=是',
  `is_disable` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否禁用: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 775 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统菜单管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_auth_perm
-- ----------------------------
DROP TABLE IF EXISTS `la_system_auth_perm`;
CREATE TABLE `la_system_auth_perm`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '主键',
  `role_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色ID',
  `menu_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '菜单ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统角色菜单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_auth_post
-- ----------------------------
DROP TABLE IF EXISTS `la_system_auth_post`;
CREATE TABLE `la_system_auth_post`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '岗位编码',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '岗位名称',
  `remarks` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '岗位备注',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '岗位排序',
  `is_stop` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否停用: 0=否, 1=是',
  `is_delete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统岗位管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_auth_role
-- ----------------------------
DROP TABLE IF EXISTS `la_system_auth_role`;
CREATE TABLE `la_system_auth_role`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '角色名称',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注信息',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色排序',
  `is_disable` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否禁用: 0=否, 1=是',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统角色管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_config
-- ----------------------------
DROP TABLE IF EXISTS `la_system_config`;
CREATE TABLE `la_system_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型',
  `name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '键',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '值',
  `create_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统全局配置表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_log_login
-- ----------------------------
DROP TABLE IF EXISTS `la_system_log_login`;
CREATE TABLE `la_system_log_login`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '注解',
  `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录账号',
  `ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录地址',
  `os` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作系统',
  `browser` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '浏览器',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '操作状态: 1=成功, 2=失败',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统登录日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_log_operate
-- ----------------------------
DROP TABLE IF EXISTS `la_system_log_operate`;
CREATE TABLE `la_system_log_operate`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作人ID',
  `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '请求类型: GET/POST/PUT',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作标题',
  `ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '请求IP',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '请求接口',
  `method` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '请求方法',
  `args` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '请求参数',
  `error` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '错误信息',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '执行状态: 1=成功, 2=失败',
  `start_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始时间',
  `end_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束时间',
  `task_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '执行耗时',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_system_log_sms
-- ----------------------------
DROP TABLE IF EXISTS `la_system_log_sms`;
CREATE TABLE `la_system_log_sms`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `scene` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '场景编号',
  `mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号码',
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送内容',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发送状态：[0=发送中, 1=发送成功, 2=发送失败]',
  `results` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '短信结果',
  `send_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发送时间',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统短信日志表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- INSERT
-- ----------------------------
BEGIN;
INSERT INTO `la_system_auth_dept` VALUES (1, 0, '默认部门', '康明', '18327647788', 10, 0, 0, 1649841995, 1660190949, 0);
INSERT INTO `la_system_auth_admin` VALUES (1, 1, 0, 'admin', 'admin', '7fac2474740becfaf1ecbdd6cc8fb076', '/api/static/backend_avatar.png', '0', '5Xar0', 0, 1, 0, 0, '127.0.0.1', 1660641347, 1642321599, 1660287325, 0);
INSERT INTO `la_system_auth_role` VALUES (1, '审核员', '审核数据', 0, 0, 1668679451, 1668679468);
COMMIT;

BEGIN;
INSERT INTO `la_system_config` VALUES (1, 'storage', 'default', 'local', 1660620367, 1662620927);
INSERT INTO `la_system_config` VALUES (2, 'storage', 'local', '{\"name\":\"本地存储\"}', 1660620367, 1662620927);
INSERT INTO `la_system_config` VALUES (3, 'storage', 'qiniu', '{\"name\":\"七牛云存储\",\"bucket\":\"\",\"secretKey\":\"\",\"accessKey\":\"\",\"domain\":\"\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (4, 'storage', 'aliyun', '{\"name\":\"阿里云存储\",\"bucket\":\"\",\"secretKey\":\"\",\"accessKey\":\"\",\"domain\":\"\"}', 1660620367, 1662620071);
INSERT INTO `la_system_config` VALUES (5, 'storage', 'qcloud', '{\"name\":\"腾讯云存储\",\"bucket\":\"\",\"secretKey\":\"\",\"accessKey\":\"\",\"domain\":\"\",\"region\":\"\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (6, 'sms', 'default', 'aliyun', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (7, 'sms', 'aliyun', '{\"name\":\"阿里云短信\",\"alias\":\"aliyun\",\"sign\":\"\",\"appKey\":\"\",\"secretKey\":\"\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (8, 'sms', 'tencent', '{\"name\":\"腾讯云短信\",\"alias\":\"tencent\",\"sign\":\"\",\"appId\":\"\",\"secretId\":\"\",\"secretKey\":\"\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (9, 'sms', 'huawei', '{\"name\":\"华为云短信\",\"alias\":\"huawei\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (10, 'website', 'name', 'LikeAdmin开源后台', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (11, 'website', 'logo', '/api/static/backend_logo.png', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (12, 'website', 'favicon', '/api/static/backend_favicon.ico', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (13, 'website', 'backdrop', '/api/static/backend_backdrop.png', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (14, 'website', 'copyright', '[{\"name\":\"LikeAdmin开源系统\",\"link\":\"http://www.beian.gov.cn\"}]', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (15, 'website', 'shopName', 'LikeAdmin开源系统', 1631255140, 1631255140);
INSERT INTO `la_system_config` VALUES (16, 'website', 'shopLogo', '/api/static/shop_logo.png', 1631255140, 1631255140);
INSERT INTO `la_system_config` VALUES (17, 'protocol', 'service', '{\"name\":\"服务协议\",\"content\":\"\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (18, 'protocol', 'privacy', '{\"name\":\"隐私协议\",\"content\":\"\"}', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (19, 'tabbar', 'style', '{\"defaultColor\":\"#4A5DFF\",\"selectedColor\":\"#EA5455\"}', 1660620367, 1662544900);
INSERT INTO `la_system_config` VALUES (20, 'search', 'isHotSearch', '0', 1660620367, 1662546997);
INSERT INTO `la_system_config` VALUES (30, 'h5_channel', 'status', '1', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (31, 'h5_channel', 'close', '0', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (32, 'h5_channel', 'url', '', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (40, 'mp_channel', 'name', '', 1660620367, 1662551403);
INSERT INTO `la_system_config` VALUES (41, 'mp_channel', 'primaryId', '', 1660620367, 1662551403);
INSERT INTO `la_system_config` VALUES (42, 'mp_channel', 'appId', '', 1660620367, 1662551403);
INSERT INTO `la_system_config` VALUES (43, 'mp_channel', 'appSecret', '', 1660620367, 1662551403);
INSERT INTO `la_system_config` VALUES (44, 'mp_channel', 'qrCode', '', 1660620367, 1662551403);
INSERT INTO `la_system_config` VALUES (50, 'wx_channel', 'appId', '', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (51, 'wx_channel', 'appSecret', '', 1660620367, 1660620367);
INSERT INTO `la_system_config` VALUES (55, 'oa_channel', 'name', '', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (56, 'oa_channel', 'primaryId', ' ', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (57, 'oa_channel', 'qrCode', '', 1662551337, 1662551337);
INSERT INTO `la_system_config` VALUES (58, 'oa_channel', 'appId', '', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (59, 'oa_channel', 'appSecret', '', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (60, 'oa_channel', 'url', '', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (61, 'oa_channel', 'token', '', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (62, 'oa_channel', 'encodingAesKey', '', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (63, 'oa_channel', 'encryptionType', '1', 1660620367, 1662551337);
INSERT INTO `la_system_config` VALUES (64, 'oa_channel', 'menus', '[]', 1631255140, 1663118712);
INSERT INTO `la_system_config` VALUES (70, 'login', 'loginWay', '1,2', 1660620367, 1662538771);
INSERT INTO `la_system_config` VALUES (71, 'login', 'forceBindMobile', '0', 1660620367, 1662538771);
INSERT INTO `la_system_config` VALUES (72, 'login', 'openAgreement', '1', 1660620367, 1662538771);
INSERT INTO `la_system_config` VALUES (73, 'login', 'openOtherAuth', '1', 1660620367, 1662538771);
INSERT INTO `la_system_config` VALUES (74, 'login', 'autoLoginAuth', '1,2', 1660620367, 1662538771);
INSERT INTO `la_system_config` VALUES (80, 'user', 'defaultAvatar', '/api/static/default_avatar.png', 1660620367, 1662535156);
COMMIT;

BEGIN;
INSERT INTO `la_notice_setting` VALUES (1, 101, '登录验证码', '用户手机号码登录时发送', 1, 2, '{}', '{\"type\":\"sms\",\"templateId\":\"SMS_222458159\",\"content\":\"您正在登录，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"tips\":[\"可选变量 验证码:code\",\"示例：您正在登录，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"生效条件：1、管理后台完成短信设置。2、第三方短信平台申请模板。\"],\"status\":\"1\"}', '{}', '{}', 0, 1648696695, 1648696695, 0);
INSERT INTO `la_notice_setting` VALUES (2, 102, '绑定手机验证码', '用户绑定手机号码时发送', 1, 2, '{}', '{\"type\":\"sms\",\"templateId\":\"SMS_175615069\",\"content\":\"您正在绑定手机号，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"tips\":[\"可选变量 验证码:code\",\"示例：您正在绑定手机号，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"生效条件：1、管理后台完成短信设置。2、第三方短信平台申请模板。\"],\"status\":\"1\"}', '{}', '{}', 0, 1648696695, 1648696695, 0);
INSERT INTO `la_notice_setting` VALUES (3, 103, '变更手机验证码', '用户变更手机号码时发送', 1, 2, '{}', '{\"type\":\"sms\",\"templateId\":\"SMS_207952628\",\"content\":\"您正在变更手机号，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"tips\":[\"可选变量 验证码:code\",\"示例：您正在变更手机号，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"生效条件：1、管理后台完成短信设置。2、第三方短信平台申请模板。\"],\"status\":\"1\"}', '{}', '{}', 0, 1648696695, 1648696695, 0);
INSERT INTO `la_notice_setting` VALUES (4, 104, '找回登录密码验证码', '用户找回登录密码号码时发送', 1, 2, '{}', '{\"type\":\"sms\",\"templateId\":\"SMS_175615069\",\"content\":\"您正在找回登录密码，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"tips\":[\"可选变量 验证码:code\",\"示例：您正在找回登录密码，验证码${code}，切勿将验证码泄露于他人，本条验证码有效期5分钟。\",\"条验证码有效期5分钟。\"],\"status\":\"1\"}', '{}', '{}', 0, 1648696695, 1648696695, 0);
COMMIT;

BEGIN;
INSERT INTO `la_system_auth_menu` VALUES (1, 0, 'C', '工作台', 'el-icon-Monitor', 50, 'index:console', 'workbench', 'workbench/index', '', '', 1, 1, 0, 1650341765, 1668672757);
INSERT INTO `la_system_auth_menu` VALUES (100, 0, 'M', '权限管理', 'el-icon-Lock', 44, '', 'permission', '', '', '', 0, 1, 0, 1650341765, 1662626201);
INSERT INTO `la_system_auth_menu` VALUES (101, 100, 'C', '管理员', 'local-icon-wode', 0, 'system:admin:list', 'admin', 'permission/admin/index', '', '', 1, 1, 0, 1650341765, 1663301404);
INSERT INTO `la_system_auth_menu` VALUES (102, 101, 'A', '管理员详情', '', 0, 'system:admin:detail', '', '', '', '', 0, 1, 0, 1650341765, 1660201785);
INSERT INTO `la_system_auth_menu` VALUES (103, 101, 'A', '管理员新增', '', 0, 'system:admin:add', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (104, 101, 'A', '管理员编辑', '', 0, 'system:admin:edit', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (105, 101, 'A', '管理员删除', '', 0, 'system:admin:del', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (106, 101, 'A', '管理员状态', '', 0, 'system:admin:disable', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (110, 100, 'C', '角色管理', 'el-icon-Female', 0, 'system:role:list', 'role', 'permission/role/index', '', '', 1, 1, 0, 1650341765, 1663301451);
INSERT INTO `la_system_auth_menu` VALUES (111, 110, 'A', '角色详情', '', 0, 'system:role:detail', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (112, 110, 'A', '角色新增', '', 0, 'system:role:add', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (113, 110, 'A', '角色编辑', '', 0, 'system:role:edit', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (114, 110, 'A', '角色删除', '', 0, 'system:role:del', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (120, 100, 'C', '菜单管理', 'el-icon-Operation', 0, 'system:menu:list', 'menu', 'permission/menu/index', '', '', 1, 1, 0, 1650341765, 1663301388);
INSERT INTO `la_system_auth_menu` VALUES (121, 120, 'A', '菜单详情', '', 0, 'system:menu:detail', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (122, 120, 'A', '菜单新增', '', 0, 'system:menu:add', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (123, 120, 'A', '菜单编辑', '', 0, 'system:menu:edit', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (124, 120, 'A', '菜单删除', '', 0, 'system:menu:del', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (130, 0, 'M', '组织管理', 'el-icon-OfficeBuilding', 45, '', 'organization', '', '', '', 0, 1, 0, 1650341765, 1664416715);
INSERT INTO `la_system_auth_menu` VALUES (131, 130, 'C', '部门管理', 'el-icon-Coordinate', 0, 'system:dept:list', 'department', 'organization/department/index', '', '', 1, 1, 0, 1650341765, 1660201994);
INSERT INTO `la_system_auth_menu` VALUES (132, 131, 'A', '部门详情', '', 0, 'system:dept:detail', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (133, 131, 'A', '部门新增', '', 0, 'system:dept:add', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (134, 131, 'A', '部门编辑', '', 0, 'system:dept:edit', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (135, 131, 'A', '部门删除', '', 0, 'system:dept:del', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (140, 130, 'C', '岗位管理', 'el-icon-PriceTag', 0, 'system:post:list', 'post', 'organization/post/index', '', '', 1, 1, 0, 1650341765, 1660202057);
INSERT INTO `la_system_auth_menu` VALUES (141, 140, 'A', '岗位详情', '', 0, 'system:post:detail', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (142, 140, 'A', '岗位新增', '', 0, 'system:post:add', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (143, 140, 'A', '岗位编辑', '', 0, 'system:post:edit', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (144, 140, 'A', '岗位删除', '', 0, 'system:post:del', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (200, 0, 'M', '其它管理', '', 0, '', '', '', '', '', 0, 0, 0, 1650341765, 1660636870);
INSERT INTO `la_system_auth_menu` VALUES (201, 200, 'M', '图库管理', '', 0, '', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (202, 201, 'A', '文件列表', '', 0, 'albums:albumList', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (203, 201, 'A', '文件命名', '', 0, 'albums:albumRename', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (204, 201, 'A', '文件移动', '', 0, 'albums:albumMove', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (205, 201, 'A', '文件删除', '', 0, 'albums:albumDel', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (206, 201, 'A', '分类列表', '', 0, 'albums:cateList', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (207, 201, 'A', '分类新增', '', 0, 'albums:cateAdd', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (208, 201, 'A', '分类命名', '', 0, 'albums:cateRename', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (209, 201, 'A', '分类删除', '', 0, 'albums:cateDel', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (215, 200, 'M', '上传管理', '', 0, '', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (216, 215, 'A', '上传图片', '', 0, 'upload:image', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (217, 215, 'A', '上传视频', '', 0, 'upload:video', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (500, 0, 'M', '系统设置', 'el-icon-Setting', 0, '', 'setting', '', '', '', 0, 1, 0, 1650341765, 1662626322);
INSERT INTO `la_system_auth_menu` VALUES (501, 500, 'M', '网站设置', 'el-icon-Basketball', 10, '', 'website', '', '', '', 0, 1, 0, 1650341765, 1663233572);
INSERT INTO `la_system_auth_menu` VALUES (502, 501, 'C', '网站信息', '', 0, 'setting:website:detail', 'information', 'setting/website/information', '', '', 0, 1, 0, 1650341765, 1660202218);
INSERT INTO `la_system_auth_menu` VALUES (503, 502, 'A', '保存配置', '', 0, 'setting:website:save', '', '', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (505, 501, 'C', '网站备案', '', 0, 'setting:copyright:detail', 'filing', 'setting/website/filing', '', '', 0, 1, 0, 1650341765, 1660202294);
INSERT INTO `la_system_auth_menu` VALUES (506, 505, 'A', '备案保存', '', 0, 'setting:copyright:save', '', 'setting/website/protocol', '', '', 0, 0, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (510, 501, 'C', '政策协议', '', 0, 'setting:protocol:detail', 'protocol', 'setting/website/protocol', '', '', 0, 1, 0, 1660027606, 1660202312);
INSERT INTO `la_system_auth_menu` VALUES (511, 510, 'A', '协议保存', '', 0, 'setting:protocol:save', '', '', '', '', 0, 0, 0, 1660027606, 1663670865);
INSERT INTO `la_system_auth_menu` VALUES (515, 600, 'C', '字典管理', 'el-icon-Box', 0, 'setting:dict:type:list', 'dict', 'setting/dict/type/index', '', '', 0, 1, 0, 1660035436, 1663226087);
INSERT INTO `la_system_auth_menu` VALUES (516, 515, 'A', '字典类型新增', '', 0, 'setting:dict:type:add', '', '', '', '', 0, 1, 0, 1660202761, 1660202761);
INSERT INTO `la_system_auth_menu` VALUES (517, 515, 'A', '字典类型编辑', '', 0, 'setting:dict:type:edit', '', '', '', '', 0, 1, 0, 1660202842, 1660202842);
INSERT INTO `la_system_auth_menu` VALUES (518, 515, 'A', '字典类型删除', '', 0, 'setting:dict:type:del', '', '', '', '', 0, 1, 0, 1660202903, 1660202903);
INSERT INTO `la_system_auth_menu` VALUES (519, 600, 'C', '字典数据管理', '', 0, 'setting:dict:data:list', 'dict/data', 'setting/dict/data/index', '/dev_tools/dict', '', 0, 0, 0, 1660202948, 1663309252);
INSERT INTO `la_system_auth_menu` VALUES (520, 515, 'A', '字典数据新增', '', 0, 'setting:dict:data:add', '', '', '', '', 0, 1, 0, 1660203117, 1660203117);
INSERT INTO `la_system_auth_menu` VALUES (521, 515, 'A', '字典数据编辑', '', 0, 'setting:dict:data:edit', '', '', '', '', 0, 1, 0, 1660203142, 1660203142);
INSERT INTO `la_system_auth_menu` VALUES (522, 515, 'A', '字典数据删除', '', 0, 'setting:dict:data:del', '', '', '', '', 0, 1, 0, 1660203159, 1660203159);
INSERT INTO `la_system_auth_menu` VALUES (550, 500, 'M', '系统维护', 'el-icon-SetUp', 0, '', 'system', '', '', '', 0, 1, 0, 1650341765, 1660202466);
INSERT INTO `la_system_auth_menu` VALUES (551, 550, 'C', '系统环境', '', 0, 'monitor:server', 'environment', 'setting/system/environment', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (552, 550, 'C', '系统缓存', '', 0, 'monitor:cache', 'cache', 'setting/system/cache', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (553, 550, 'C', '系统日志', '', 0, 'system:log:operate', 'journal', 'setting/system/journal', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (555, 500, 'C', '存储设置', 'el-icon-FolderOpened', 6, 'setting:storage:list', 'storage', 'setting/storage/index', '', '', 0, 1, 0, 1650341765, 1663312996);
INSERT INTO `la_system_auth_menu` VALUES (556, 555, 'A', '保存配置', '', 0, 'setting:storage:edit', '', '', '', '', 0, 1, 0, 1650341765, 1650341765);
INSERT INTO `la_system_auth_menu` VALUES (600, 0, 'M', '开发工具', 'el-icon-EditPen', 0, '', 'dev_tools', '', '', '', 0, 1, 0, 1660027606, 1664335701);
INSERT INTO `la_system_auth_menu` VALUES (610, 600, 'C', '代码生成器', 'el-icon-DocumentAdd', 0, 'gen:list', 'code', 'dev_tools/code/index', '', '', 0, 1, 0, 1660028954, 1660532510);
INSERT INTO `la_system_auth_menu` VALUES (611, 610, 'A', '导入数据表', '', 0, 'gen:importTable', '', '', '', '', 0, 1, 0, 1660532389, 1660532389);
INSERT INTO `la_system_auth_menu` VALUES (612, 610, 'A', '生成代码', '', 0, 'gen:genCode', '', '', '', '', 0, 1, 0, 1660532421, 1660532421);
INSERT INTO `la_system_auth_menu` VALUES (613, 610, 'A', '下载代码', '', 0, 'gen:downloadCode', '', '', '', '', 0, 1, 0, 1660532437, 1660532437);
INSERT INTO `la_system_auth_menu` VALUES (614, 610, 'A', '预览代码', '', 0, 'gen:previewCode', '', '', '', '', 0, 1, 0, 1660532549, 1660532549);
INSERT INTO `la_system_auth_menu` VALUES (616, 610, 'A', '同步表结构', '', 0, 'gen:syncTable', '', '', '', '', 0, 1, 0, 1660532781, 1660532781);
INSERT INTO `la_system_auth_menu` VALUES (617, 610, 'A', '删除数据表', '', 0, 'gen:delTable', '', '', '', '', 0, 1, 0, 1660532800, 1660532800);
INSERT INTO `la_system_auth_menu` VALUES (618, 610, 'A', '数据表详情', '', 0, 'gen:detail', '', '', '', '', 0, 1, 0, 1660532964, 1660532977);
INSERT INTO `la_system_auth_menu` VALUES (700, 0, 'M', '素材管理', 'el-icon-Picture', 43, '', 'material', '', '', '', 0, 1, 0, 1660203293, 1663300847);
INSERT INTO `la_system_auth_menu` VALUES (701, 700, 'C', '素材中心', 'el-icon-PictureRounded', 0, '', 'index', 'material/index', '', '', 0, 1, 0, 1660203402, 1663301493);
COMMIT;



-- ----------------------------
-- Table structure for la_client_user
-- ----------------------------
DROP TABLE IF EXISTS `la_client_user`;
CREATE TABLE `la_client_user`
(
    `id`               int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
    `sn`               varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '用户编码',
    `avatar`           varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像',
    `real_name`        varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '真实姓名',
    `nickname`         varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '用户昵称',
    `username`         varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '用户账号',
    `mobile`           varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '用户电话',

    `regid`            varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机订阅PUSH推送标识',
    `device_id`        varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '设备唯一标识',
    `provider`         varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '手机设备厂商',
    `model`            varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '设备型号',
    `sex`              tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户性别: [1=男, 2=女, 0=未知]',

    `coin_buy`         int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '币-购买',
    `coin_gift`        int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '币-赠送',
    `user_type`        tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '用户类型: [1=普通用户, 2=vip用户]',
    `vip_time`         int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员过期时间',

    `add_desktop`      tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否添加桌面: [0=否, 1=是]',
    `source_id`        varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '渠道编码',
    `account_id`       varchar(32)  CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '广告账户id',
    `source_id_active` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '渠道编码-激活',
    `active_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '激活时间',
    `creater_id`       int(10) NOT NULL DEFAULT '0' COMMENT '创建者',

    `channel`          tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '投放渠道：[1=头条, 2=百度, 3=uc, 4=oppo, 5=vivo, 6=快手]',
    `package_name`     varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '应用包名',
    `version`          varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '应用版本号',
    `version_last`     varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '应用最后登录版本号',

    `register_ip`      varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '注册IP',
    `last_login_ip`    varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '最后登录IP',
    `register_ua`      varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '请求用户UA',
    `last_ua`          varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '上次登录UA',
    `city_info`        varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '城市信息',

    `callback_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '回传状态 0未回传 1已回传',
    `is_disable`       tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否异常: [0=正常, 1=异常]',
    `is_black`          tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否拉黑: [0=正常, 1=拉黑]',
    `is_jump`          tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否异常: [1=短剧, 2=工具 3=小说]',
    `is_delete`        tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除: [0=否, 1=是]',

    `last_login_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后登录时间',
    `create_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;



-- ----------------------------
-- Table structure for la_app_configs
-- ----------------------------
DROP TABLE IF EXISTS `la_app_configs`;
CREATE TABLE `la_app_configs`
(
    `id`          int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',

    `title`       varchar(32) NOT NULL COMMENT '应用名称',
    `package_name` varchar(500) NOT NULL DEFAULT '' COMMENT '应用标识',
    `app_id`      varchar(32) NOT NULL COMMENT '唯一标识',
    `app_secret`  varchar(64) NOT NULL COMMENT '小程序密钥',
    `version`     varchar(16) NOT NULL DEFAULT '1.0.0' COMMENT '版本号',

    `pay_flag`    varchar(200)  NOT NULL DEFAULT '' COMMENT '支付渠道标识 -xx-xx-',

    `status`      tinyint(1) NOT NULL DEFAULT 1 COMMENT '1启用 0禁用',

    `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `uk_app` (`app_id`,`app_secret`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '应用配置表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for la_drama
-- ----------------------------
DROP TABLE IF EXISTS `la_drama`;
CREATE TABLE `la_drama`
(
    `drama_id`       varchar(32)  NOT NULL COMMENT '短剧唯一标识(ULID格式)',
    `title`          varchar(100) NOT NULL COMMENT '短剧标题',
    `description`    varchar(2000) NOT NULL COMMENT '详细描述',
    `cover_url`      varchar(255) NOT NULL COMMENT '封面图URL',
    `is_completed`   tinyint(1) NOT NULL DEFAULT 0 COMMENT '0连载中 1已完结',
    `status`         tinyint(1) NOT NULL DEFAULT 1 COMMENT '1可观看 0禁止观看',
    `total_episodes` int(11) NOT NULL DEFAULT 1 COMMENT '总集数',
    `heat_value`     int(11) NOT NULL DEFAULT 0 COMMENT '热度值',
    `money`          int(11) NOT NULL DEFAULT 60 COMMENT '价格',
    `tag`            varchar(200) NOT NULL COMMENT '标签',
    `create_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`drama_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短剧表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_drama_series
-- ----------------------------
DROP TABLE IF EXISTS `la_drama_series`;
CREATE TABLE `la_drama_series`
(
    `series_id`      varchar(32)  NOT NULL COMMENT '剧集唯一标识',
    `drama_id`       varchar(32)  NOT NULL COMMENT '短剧唯一标识',
    `title`          varchar(100) NOT NULL COMMENT '短剧标题',
    `video_url`      varchar(255) NOT NULL COMMENT '封面图URL',
    `is_vip`         tinyint(1) NOT NULL DEFAULT 1 COMMENT '1需付费 0免费',
    `sort`           int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '序号',
    `create_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`series_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短剧剧集表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_read_records
-- ----------------------------
DROP TABLE IF EXISTS `la_read_records`;
CREATE TABLE `la_read_records`
(
    `id`               int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',

    `uid`             int(10)  NOT NULL DEFAULT 0 COMMENT '用户uid',
    `creater_id`           int(10) NOT NULL DEFAULT '0' COMMENT '创建者',

    `series_id`      varchar(32)  NOT NULL DEFAULT '' COMMENT '剧集唯一标识',
    `drama_id`       varchar(32)  NOT NULL DEFAULT '' COMMENT '短剧唯一标识',
    `money`          int(10)  NOT NULL DEFAULT 0 COMMENT '价格',

    `last_time`        int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上次阅读时间',
    `start_time`       int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始阅读时间',
    `user_create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户注册时间',

    `create_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`id`) USING BTREE,
    KEY  `index_uid` (`uid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '阅读记录表' ROW_FORMAT = Dynamic;


DROP TABLE IF EXISTS `la_recharge_gear_type`;
CREATE TABLE `la_recharge_gear_type`
(
    `t_id`         int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',

    `title`        varchar(100) NOT NULL DEFAULT '' COMMENT '标题',

    `status`       tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否默认 1 默认 0 不默认',
    `is_show`       tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否可以选择 1 是 0 不能选择',

    PRIMARY KEY (`t_id`) USING BTREE,
    KEY            `idx_is_show` (`is_show`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '充值档位表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for la_recharge_gear
-- ----------------------------
DROP TABLE IF EXISTS `la_recharge_gear`;
CREATE TABLE `la_recharge_gear`
(
    `id`           int(11) NOT NULL AUTO_INCREMENT,

    `t_id`         int(11) NOT NULL DEFAULT 0 COMMENT '充值模板编号',

    `type`         tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '充值类型 1普通充值 2会员充值',
    `title`        varchar(50) NOT NULL DEFAULT '' COMMENT '标题',

    `price`        int(10) NOT NULL DEFAULT '0' COMMENT '充值金额',
    `buy`          int(10) NOT NULL DEFAULT '0' COMMENT '币-购买',
    `gift`         int(10) NOT NULL DEFAULT '0' COMMENT '币-赠送',
    `vip_days`     int(10) NOT NULL DEFAULT '0' COMMENT '会员天数',

    `sign`         int(1) NOT NULL DEFAULT '0' COMMENT '标签，0无,1热门,2限时，3推荐',
    `is_default`   tinyint(1) unsigned DEFAULT '0' COMMENT '是否默认选择，1是0否',

    `sort`         int(5) NOT NULL DEFAULT '0' COMMENT '排序',
    `status`       tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1显示0隐藏',

    `recharge_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '允许充值次数',

    PRIMARY KEY (`id`) USING BTREE,
    KEY            `type` (`type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '充值档位表' ROW_FORMAT = Dynamic;


INSERT INTO `la_recharge_gear` (`id`, `t_id`, `type`, `title`, `price`, `buy`, `gift`, `vip_days`, `sign`, `is_default`, `sort`, `status`, `recharge_num`) VALUES (1, 1, 1, '38', 3800, 3800, 1500, 0, 1, 1, 2, 1, 1);
INSERT INTO `la_recharge_gear` (`id`, `t_id`, `type`, `title`, `price`, `buy`, `gift`, `vip_days`, `sign`, `is_default`, `sort`, `status`, `recharge_num`) VALUES (2, 1, 1, '35', 3500, 3500, 0, 0, 0, 0, 1, 1, 0);
INSERT INTO `la_recharge_gear` (`id`, `t_id`, `type`, `title`, `price`, `buy`, `gift`, `vip_days`, `sign`, `is_default`, `sort`, `status`, `recharge_num`) VALUES (3, 1, 1, '68', 6800, 6800, 4000, 0, 0, 0, 3, 1, 0);
INSERT INTO `la_recharge_gear` (`id`, `t_id`, `type`, `title`, `price`, `buy`, `gift`, `vip_days`, `sign`, `is_default`, `sort`, `status`, `recharge_num`) VALUES (4, 1, 1, '88', 8800, 8800, 8800, 0, 0, 0, 4, 1, 0);
INSERT INTO `la_recharge_gear` (`id`, `t_id`, `type`, `title`, `price`, `buy`, `gift`, `vip_days`, `sign`, `is_default`, `sort`, `status`, `recharge_num`) VALUES (5, 1, 1, '158', 15800, 15800, 18800, 0, 0, 0, 5, 1, 0);
INSERT INTO `la_recharge_gear` (`id`, `t_id`, `type`, `title`, `price`, `buy`, `gift`, `vip_days`, `sign`, `is_default`, `sort`, `status`, `recharge_num`) VALUES (6, 1, 2, '年度会员', 36500, 1, 1, 365, 3, 0, 6, 1, 0);

-- ----------------------------
-- Table structure for la_order
-- ----------------------------
DROP TABLE IF EXISTS `la_orders`;
CREATE TABLE `la_orders`
(
    `id`               bigint(20) NOT NULL AUTO_INCREMENT,

    `channel`          tinyint(2)  unsigned NOT NULL DEFAULT '4' COMMENT '应用渠道: 1=头条, 2=百度, 3=uc, 4=oppo, 5=vivo, 6=快手',
    `uid`              int(10) NOT NULL DEFAULT 0 COMMENT '用户uid',
    `creater_id`           int(10) NOT NULL DEFAULT '0' COMMENT '创建者',

    `type`             tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '充值类型 1=普通充值 2=会员充值，3=充值活动',
    `out_no`           varchar(32)                                                  NOT NULL DEFAULT '' COMMENT '订单号',
    `mch_no`           varchar(50)                                                  NOT NULL DEFAULT '' COMMENT '商户系统交易单号',

    `pay_type`         varchar(20)                                                  NOT NULL DEFAULT '' '支付类型',
    `pay_way`          varchar(50)                                                  NOT NULL DEFAULT '' '支付方式',

    `buy`              int(10) NOT NULL DEFAULT '0' COMMENT '币-购买',
    `gift`             int(10) NOT NULL DEFAULT '0' COMMENT '币-赠送',
    `vip_days`         int(10) NOT NULL DEFAULT '0' COMMENT '会员天数',

    `gear_id`          int(10) NOT NULL DEFAULT '0' COMMENT '充值档位id',
    `aid`              int(10) NOT NULL DEFAULT '0' COMMENT '充值活动id',

    `money`            int(11) NOT NULL DEFAULT '0' COMMENT '支付金额',
    `is_pay`           tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态，0未支付，1已支付',
    `pay_time`         int(10) DEFAULT NULL COMMENT '支付时间',

    `series_id`        varchar(32)                                                  NOT NULL COMMENT '剧集唯一标识',
    `drama_id`         varchar(32)                                                  NOT NULL COMMENT '短剧唯一标识',

    `source_id`        varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '渠道编码',
    `account_id`       varchar(32)  CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '广告账户id',
    `source_id_active` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '渠道编码-激活',
    `user_create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `user_active_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',

    `status`           tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '订单状态，0待支付，1已支付，2退款中，3已退款，4退款失败',
    `msg`              varchar(255)                                                          DEFAULT NULL COMMENT '订单备注',

    `package_name`     varchar(32)                                                  NOT NULL DEFAULT '' COMMENT '应用标识',
    `pay_flag`         varchar(50)                                                  NOT NULL DEFAULT '' COMMENT '支付渠道标识',
    `pay_ip`           varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '下单',
    `pay_ua`           varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'UA',

    `return_time`      int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '订单退款时间',
    `return_no`        varchar(50)                                                  NOT NULL DEFAULT '' COMMENT '退款单号',
    `callback_status`  tinyint(1) NOT NULL DEFAULT '0' COMMENT '回传状态 0未回传 1已回传',

    `callback_info_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '回调信息ID'
    `project_id`      varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '项目ID'
    `project_name`    varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '项目名称'
    `promotion_id`    varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '推广计划ID'
    `promotion_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '推广计划名称'

    `create_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`      int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`id`) USING BTREE,
    KEY                `index_uid` (`uid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单表' ROW_FORMAT = Dynamic;

-- 为 la_orders 表添加回调相关字段
ALTER TABLE `la_orders`
    ADD COLUMN `project_id` varchar(100) NOT NULL DEFAULT '' COMMENT '项目ID' AFTER `callback_status`,
    ADD COLUMN `project_name` varchar(100) NOT NULL DEFAULT '' COMMENT '项目名称' AFTER `project_id`,
    ADD COLUMN `promotion_id` varchar(100) NOT NULL DEFAULT '' COMMENT '推广计划ID' AFTER `project_name`,
    ADD COLUMN `promotion_name` varchar(100) NOT NULL DEFAULT '' COMMENT '推广计划名称' AFTER `promotion_id`,
    ADD COLUMN `callback_info_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '回调信息ID' AFTER `promotion_name`;

-- ----------------------------
-- Table structure for la_pay_configs
-- ----------------------------
DROP TABLE IF EXISTS `la_pay_configs`;
CREATE TABLE `la_pay_configs`
(

    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',

    `title`        varchar(100) NOT NULL DEFAULT '' COMMENT '配置标题',
    `flag`        varchar(100) NOT NULL DEFAULT '' COMMENT '使用标识',
    `mer_no`       varchar(50)  NOT NULL DEFAULT '' COMMENT '商户编号',
    `mer_account`  varchar(100) NOT NULL DEFAULT '' COMMENT '商户账号',
    `private_key`  text         NOT NULL COMMENT '私钥',
    `public_key`   text         NOT NULL COMMENT '公钥',

    `status`       tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态，0=不启用，1=已启用，2=异常''',

    `package_name` varchar(500) NOT NULL DEFAULT '' COMMENT '应用标识 -xx-xx-',


    `create_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `index_mer_no`(`mer_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支付配置表' ROW_FORMAT = Dynamic;

INSERT INTO `la_pay_configs` (`id`, `title`, `flag`, `mer_no`, `mer_account`, `private_key`, `public_key`, `status`, `package_name`, `create_time`, `update_time`, `delete_time`) VALUES (1, '米花小程序支付', 'mihua_xingwang_10005576', '10005576', '6485fe89447448f9b9656832443db700', 'MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIUHix0cn2cdpQVvJ9Nz5w9Svjo6EHaUmOcOV1bFX2adskfvhc8l43YQwraDQjbbd/1dq5RJFa81dxMEeScwlzCxu/xD8QEqHEzNzLs4Bvtl4VT00S8HA9f9J4rZjsW9CXPSmMS10OgkE4X27U9/WDfLqDIjk1TnY3PjmTh9vC3rAgMBAAECgYAazMk+5SxL5tH/BUS9ucTb9mxyaI42hXtEWURJK9wrXSu0iFGpyNVJTNkdUdY+HPrQZVWSuyKOOLQzdZw+w/BBRg0gi8mu5GQknynI8Q2r4isdb4L5bfabC6siEkjlJsKOl6/hHUEuNEHQOPyTXZyE970khjrSdeDxEXgFBnwDmQJBAPy74C/Pzui8pBZ2tTz1DpbuTk6qUKajEzgOT695EQyTQxWrtI2/RnZPmFSqjJB23AtysEiK8tkkgUEX3gS7640CQQCGv6W1CflOjtBrg9ux/5VxOGjOW5cGMlSdlEg5juu0P5AwHC77uCPVDFa/lOh3tudK0picl3vZeqsoMcTpUuVXAkBVaBwLrDss1UrSOI1oqxuiD6gw10dn+KXvBI8TKmODj2RVN3BNknz6UE2XFwdnbnNP/xLpgOMuVDLFz438pZClAkB4f31Bze+BzriWzM1z+ai8HMOsdb8yLWP5npaP0jz5bTYVr75cH6j7ZhNVM2ZHV+qxwG306oo4Szgvs4HxXM31AkA0wCdkYHBoc9QxJV4KTlVQzCht3lw6OAYtUBHGFE5v+siaW3Dz91goOk4wAEYA2XkCYCW4O0YHeOWO7sgjaT6P', 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCFB4sdHJ9nHaUFbyfTc+cPUr46OhB2lJjnDldWxV9mnbJH74XPJeN2EMK2g0I223f9XauUSRWvNXcTBHknMJcwsbv8Q/EBKhxMzcy7OAb7ZeFU9NEvBwPX/SeK2Y7FvQlz0pjEtdDoJBOF9u1Pf1g3y6gyI5NU52Nz45k4fbwt6wIDAQAB', 1, '-com.miniw.zhenying.xinwang-', 0, 0, 0);
INSERT INTO `la_pay_configs` (`id`, `title`, `flag`, `mer_no`, `mer_account`, `private_key`, `public_key`, `status`, `package_name`, `create_time`, `update_time`, `delete_time`) VALUES (2, '米花-康庆-小程序直连', 'mihua_kangqing_10005613', '10005613', 'eee41f88a2924026982f9e1137cea0e7', 'MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALGO2zgpPgZGDnGuG9Z87nZBSmyhd/Q2yoAt2a+Zk4/tnzVh6K73me00LU51R6T+oGqKwamxe3Bh4Yqsp2vycTwxCAH6b0ju7pLUlZ+v1EQRqNTyaHOo6YczFBpAoc3Bhi0k6nSViYsvitZ3FBgbmPGEG6MiQehujCXovGZT+2LFAgMBAAECgYB9tIPjSN+OlX6YYQl4Ws6Ajkzgh5hjH39SLCPXvETKOxLiOkT/ynABjVUeHM3yNAriIwZk2zBnKgUBpqaJOAWNxuU5C5fN/65tMAz7m8NyR8ZX43r71JmkvXe4bJ9FsyVdrFQ6tcGOyBDcv0EoHPPss1LSgiYPpSPViJ/HT6xWaQJBAOZs6bHgjcW9L+9XrSjKRaBL7OEn2fygSXus6h1BrayvRCtg1lWAuZig5SZkLYrZAAfCR0PSNa5tDbcI/ufAP28CQQDFQ9HXwOX1EozCbP3Em7ipe7fNLEFwlC7hGgVrgz9wwTueA6A/XvGPUuFva4k/XeN5ubHqBRc0w4t2eXW0fWcLAkAprLcTicZ6Zf4ebqANyY+QL0s3aaq+SwsfSCXLhs5vdf+BTPFW44ItvaPULrgh7Z9Yx+V1ubYlxul9Gi5oIdgXAkBbAbXe3sx4au1riVLuEJV6A2zBiEhMguC50wJrHmr3Pv6dILkeY1P4NllwyODRziPy9XuiJmUVX52Is/JcqXoPAkB0m6myUZ43YOC7/I47S1mnFAHxmBbfPqTv7m4ThkRDHFS0AYh4yy1wQd6kRJQU/hbGd31tNLcDqS6twdPkl9+g', 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxjts4KT4GRg5xrhvWfO52QUpsoXf0NsqALdmvmZOP7Z81Yeiu95ntNC1OdUek/qBqisGpsXtwYeGKrKdr8nE8MQgB+m9I7u6S1JWfr9REEajU8mhzqOmHMxQaQKHNwYYtJOp0lYmLL4rWdxQYG5jxhBujIkHobowl6LxmU/tixQIDAQAB', 1, '-com.miniw.zhenying.xinwang-', 0, 0, 0);


-- ----------------------------
-- Table structure for la_source
-- ----------------------------
DROP TABLE IF EXISTS `la_source`;
CREATE TABLE `la_source`
(
    `source_id`            varchar(32)  NOT NULL COMMENT '渠道唯一标识(ULID格式)',
    `account_id`           varchar(32)  NOT NULL DEFAULT '' COMMENT '广告账户id',

    `title`                varchar(100) NOT NULL DEFAULT '' COMMENT '配置标题',
    `creater_id`           int(10) NOT NULL DEFAULT '0' COMMENT '创建者',

    `channel`              tinyint(2)  unsigned NOT NULL DEFAULT '4' COMMENT '应用渠道: 1=头条, 2=百度, 3=uc, 4=oppo, 5=vivo, 6=快手',
    `package_name`         varchar(50)  NOT NULL DEFAULT '' COMMENT '应用标识 xx',

    `rebate`               int(10) NOT NULL  DEFAULT '0' COMMENT '返点系数',
    `paid_price`           int(10) NOT NULL  DEFAULT '0' COMMENT '赔付金额',
    `recharge`             int(10) NOT NULL  DEFAULT '0' COMMENT '充值金额',

    `gear_type`             int(10) NOT NULL  DEFAULT '0' COMMENT '充值模板id',

    `series_id`            varchar(32)  NOT NULL DEFAULT '' COMMENT '剧集唯一标识',
    `drama_id`             varchar(32)  NOT NULL DEFAULT '' COMMENT '短剧唯一标识',
    `map_book`             varchar(500) NOT NULL DEFAULT '' COMMENT '映射书籍配置json',

    `desktop_type`         tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '加桌方式 0=不加桌 1=强制加桌 2=非强制加桌',
    `add_count`            int(10) unsigned NOT NULL DEFAULT '0' COMMENT '强制加卓数',

    `recharge_template_id` int(10) NOT NULL DEFAULT '0' COMMENT '充值模板ID',
    `free`                 int(10) NOT NULL DEFAULT '0' COMMENT '免费章节数',

    `pv`                   int(10) NOT NULL DEFAULT '0' COMMENT 'pv',
    `uv`                   int(10) NOT NULL DEFAULT '0' COMMENT 'uv',
    `shield_num`           int(10) unsigned NOT NULL DEFAULT '0' COMMENT '屏蔽用户数',

    `areas`                varchar(500) NOT NULL DEFAULT '' COMMENT '拉黑配置【区域拦截】',
    `is_audit`             tinyint(1) unsigned DEFAULT '1' COMMENT '是否为审核模式，1是，0否',
    `is_stop`              tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否停推模式，1是，0否',

    `create_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',

    PRIMARY KEY (`source_id`) USING BTREE,
    INDEX `index_account_id` (`account_id`) USING BTREE,
    INDEX `index_creater_id` (`creater_id`) USING BTREE,
    INDEX `index_package_name`(`package_name`) USING BTREE
) ENGINE = InnoDB  CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '外推表' ROW_FORMAT = Dynamic;



-- ----------------------------
-- Table structure for la_account
-- ----------------------------
DROP TABLE IF EXISTS `la_account`;
CREATE TABLE `la_account`
(
    `account_id`     varchar(32)  NOT NULL COMMENT '渠道唯一标识(ULID格式)',

    `channel`        tinyint(2)  NOT NULL DEFAULT '4' COMMENT '应用渠道: 1=头条, 2=百度, 3=uc, 4=oppo, 5=vivo, 6=快手',
    `creater_id`     int(10) NOT NULL DEFAULT '0' COMMENT '创建者',

    `company_name`   varchar(100) NOT NULL DEFAULT '' COMMENT '公司名称',

    `user_account`   varchar(100) NOT NULL DEFAULT '' COMMENT 'user账号名',
    `butler_account` varchar(100) NOT NULL DEFAULT '' COMMENT '管家账号名',

    `account_number` varchar(100) NOT NULL DEFAULT '' COMMENT '广告主账号',
    `account_title`  varchar(100) NOT NULL DEFAULT '' COMMENT '账号名称',

    `data_id`        varchar(500) NOT NULL DEFAULT '' COMMENT '数据源id',
    `access_token`   varchar(300) NOT NULL DEFAULT '' COMMENT 'accessToken值',
    `access_token_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'access_token时间',
    `refresh_token`  varchar(300) NOT NULL DEFAULT '' COMMENT 'refreshToken值',
    `refresh_token_time`   int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'refresh_token时间',

    `status`         tinyint(1) NOT NULL DEFAULT '1' COMMENT '账号状态 1正常 0无效',
    `package_name`   varchar(50)  NOT NULL DEFAULT '' COMMENT '应用标识 -xx-xx-',

    `rebate`         int(10) NOT NULL  DEFAULT '0' COMMENT '返点系数',
    `balance`        int(10) NOT NULL DEFAULT '0' COMMENT '余额',
    `cost`           int(10) NOT NULL DEFAULT '0' COMMENT '总消耗',
    `recharge`       int(10) NOT NULL  DEFAULT '0' COMMENT '充值金额',

    `gear_type`      int(10) NOT NULL  DEFAULT '0' COMMENT '充值模板id',

    `akey`           varchar(255)          DEFAULT NULL COMMENT '百度akey',

    `huichuan_rate`  varchar(300) NOT NULL DEFAULT '' COMMENT '回传策略比例配置',

    `create_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`    int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',

    PRIMARY KEY (`account_id`) USING BTREE,
    INDEX            `index_package_name`(`package_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告账户信息' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for la_callback_info
-- ----------------------------
DROP TABLE IF EXISTS `la_callback_info`;
CREATE TABLE `la_callback_info`
(
    `id`              int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',

    `channel`         tinyint(2)  NOT NULL DEFAULT '4' COMMENT '应用渠道: 1=头条, 2=百度, 3=uc, 4=oppo, 5=vivo, 6=快手',
    `source_id`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '渠道编码',
    `ip`              varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '注册IP',
    `ua`              varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '请求用户UA',
    `link`            varchar(1000)                                                 NOT NULL DEFAULT '1' COMMENT '监测内容',
    `remark`          varchar(50)                                                            DEFAULT '' COMMENT '上传备注',
    `callback_time`   int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上传时间',
    `callback_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '上传状态 0未上传 1已激活 2已充值 3已激活已充值',

    `project_id`      varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '项目ID'
    `project_name`    varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '项目名称'
    `promotion_id`    varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '推广计划ID'
    `promotion_name`  varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '推广计划名称'

    `create_time`     int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`     int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`     int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',

    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户数据回传表' ROW_FORMAT = Dynamic;

-- 为 la_callback_info 表添加项目相关字段
ALTER TABLE `la_callback_info`
    ADD COLUMN `project_id` varchar(100) NOT NULL DEFAULT '' COMMENT '项目ID' AFTER `ua`,
    ADD COLUMN `project_name` varchar(100) NOT NULL DEFAULT '' COMMENT '项目名称' AFTER `project_id`,
    ADD COLUMN `promotion_id` varchar(100) NOT NULL DEFAULT '' COMMENT '推广计划ID' AFTER `project_name`,
    ADD COLUMN `promotion_name` varchar(100) NOT NULL DEFAULT '' COMMENT '推广计划名称' AFTER `promotion_id`;


DROP TABLE IF EXISTS `la_recharge_report`;
CREATE TABLE `la_recharge_report`
(
    `source_id`            varchar(32)  NOT NULL COMMENT '渠道唯一标识(ULID格式)',
    `account_id`           varchar(32)  NOT NULL DEFAULT '' COMMENT '广告账户id',
    `creater_id`           int(10) NOT NULL DEFAULT '0' COMMENT '所属用户',

    `year`                 varchar(20) NOT NULL DEFAULT '' COMMENT '月份',
    `month`                varchar(20) NOT NULL DEFAULT '' COMMENT '月份',
    `date`                 varchar(20) NOT NULL DEFAULT '' COMMENT '日期',

    `rebate`               int(10) NOT NULL  DEFAULT '0' COMMENT '返点系数',
    `paid_price`           int(10) NOT NULL  DEFAULT '0' COMMENT '赔付金额',
    `cost`                 int(10) NOT NULL DEFAULT '0' COMMENT '总消耗',
    `recharge`             int(10) NOT NULL  DEFAULT '0' COMMENT '充值金额',
    `total_recharge`             int(10) NOT NULL  DEFAULT '0' COMMENT '累计充值金额',

    `users`                   int(10) NOT NULL DEFAULT '0' COMMENT '充值用户数',
    `orders`                   int(10) NOT NULL DEFAULT '0' COMMENT '充值订单数',
    `fans`           int(10) NOT NULL DEFAULT '0' COMMENT '进粉用户数',

    `create_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
    `update_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
    `delete_time`  int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间',

    INDEX `index_source_id`(`source_id`) USING BTREE,
    INDEX `index_year` (`year`) USING BTREE,
    INDEX `index_month` (`month`) USING BTREE,
    INDEX `index_date` (`date`) USING BTREE,
    INDEX `index_account_id` (`account_id`) USING BTREE,
    INDEX `index_creater_id` (`creater_id`) USING BTREE
) ENGINE = InnoDB  CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '外推充值统计表' ROW_FORMAT = Dynamic;